<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
		 
<div id="mmcont">
	<table id="stable">
		<tr>
			<td><input name="á" type="button" value="á" /></td>
			<td><input name="é" type="button" value="é" /></td>
			<td><input name="í" type="button" value="í" /></td>
			<td><input name="ó" type="button" value="ó" /></td>
			<td><input name="ú" type="button" value="ú" /></td>
			<td><input name="ñ" type="button" value="ñ" /></td>
			<td><input name="ç" type="button" value="ç" /></td>
		</tr>
		<tr>
			<td><input name="à" type="button" value="à" /></td>
			<td><input name="è" type="button" value="è" /></td>
			<td><input name="ì" type="button" value="ì" /></td>
			<td><input name="ò" type="button" value="ò" /></td>
			<td><input name="ù" type="button" value="ù" /></td>
			<td><input name="œ" type="button" value="œ" /></td>
		</tr>
		<tr>
			<td><input name="ä" type="button" value="ä" /></td>
			<td><input name="ë" type="button" value="ë" /></td>
			<td><input name="ï" type="button" value="ï" /></td>
			<td><input name="ö" type="button" value="ö" /></td>
			<td><input name="ü" type="button" value="ü" /></td>
			<td><input name="ÿ" type="button" value="ÿ" /></td>
		</tr>
		<tr>
			<td><input name="â" type="button" value="â" /></td>
			<td><input name="ê" type="button" value="ê" /></td>
			<td><input name="î" type="button" value="î" /></td>
			<td><input name="ô" type="button" value="ô" /></td>
			<td><input name="û" type="button" value="û" /></td>
			<td><input name="β" type="button" value="β" /></td>
		</tr>
	</table>
</div>
<div id="header">
	<div id="header-inner">
		<h1>
			<html:link title="Pictual" action="Welcome" styleClass="fix">
				<bean:message key="pictual.logo" />
			</html:link>
		</h1>
		<div id="idioma">
			<div id="idioma_container">
				<!-- Idiomas corregir URLS y arreglar-->
				<c:set var="en" value="en"/>
				<c:set var="es" value="es"/>
				<c:set var="de" value="de"/>
				<c:set var="fr" value="fr"/>
				
				<html:link href="" paramId="lang" paramName="en">
					<div id="uk"></div>
				</html:link>
				<html:link href="" paramId="lang" paramName="es">
					<div id="es"></div>
				</html:link>
				<html:link href="" paramId="lang" paramName="de">
					<div id="de"></div>
				</html:link>
				<html:link href="" paramId="lang" paramName="fr">
					<div id="fr"></div>
				</html:link>
			</div>
		</div>
		<ul id="nav">
			<!-- Enlaces nav -->
			<li><a href="<c:url value='/why.do'/>">
					<div id="whypictual" class="fix"></div>
			</a></li>
			<li><a href="<c:url value='/tips_learning.do'/>">
					<div id="learningtips" class="fix"></div>
			</a></li>
			<li><a href="<c:url value='/links_all.do'/>">
					<div id="usefullinks" class="fix"></div>
			</a></li>
		</ul>
	</div>
</div>
<div id="bar">
	<div id="bar-inner">
		<div id="things">
			<form action="translate.do" method="get" accept-charset="UTF-8">
				<div id="input">
					
					<logic:present name="query" scope="session">
						<input name="query" id="query" type="text" size="45" value='<%=session.getAttribute("query") %>'/>
					</logic:present>
					<logic:notPresent name="query" scope="session">
						<input name="query" id="query" type="text" size="45"/>
					</logic:notPresent>
				</div>
				<a href="#" class="boton">
					<input id="translate" type="submit" value="" />
				</a>
				<div class="separador"></div>
				<div id="selects">
					
					<!-- por defecto -->
					<logic:present name="from" scope="session">
						<select name="from" id="from2">
							<option value="en" <%if(session.getAttribute("from").equals("en")) out.println("selected");%>><bean:message key="english"/></option>
							<option value="es" <%if(session.getAttribute("from").equals("es")) out.println("selected");%>><bean:message key="spanish"/></option>
							<option value="de" <%if(session.getAttribute("from").equals("de")) out.println("selected");%>><bean:message key="german"/></option>
							<option value="fr"<%if(session.getAttribute("from").equals("fr")) out.println("selected");%> ><bean:message key="french"/></option>
						</select> 
					</logic:present>
					
					<logic:notPresent name="from" scope="session">
						<select name="from" id="from2">
							<option value="en"><bean:message key="english"/></option>
							<option value="es"><bean:message key="spanish"/></option>
							<option value="de"><bean:message key="german"/></option>
							<option value="fr"><bean:message key="french"/></option>
						</select> 
					</logic:notPresent>
					
					<logic:present name="to" scope="session">
						<span id="to">to</span>
						<select name="to" id="to2">
							<option value="en" <%if(session.getAttribute("to").equals("en")) out.println("selected");%>><bean:message key="english"/></option>
							<option value="es" <%if(session.getAttribute("to").equals("es")) out.println("selected");%>><bean:message key="spanish"/></option>
							<option value="de" <%if(session.getAttribute("to").equals("de")) out.println("selected");%>><bean:message key="german"/></option>
							<option value="fr" <%if(session.getAttribute("to").equals("fr")) out.println("selected");%>><bean:message key="french"/></option>
						</select> 
					</logic:present>
					
					<logic:notPresent name="to" scope="session">
						<span id="to">to</span>
						<select name="to" id="to2">
							<option value="en"><bean:message key="english"/></option>
							<option value="es"><bean:message key="spanish"/></option>
							<option value="de"><bean:message key="german"/></option>
							<option value="fr"><bean:message key="french"/></option>
						</select> 
					</logic:notPresent>
					<!-- por defecto -->
					
<!-- 					from -->
<%-- 					<logic:equal value="en" name="from" scope="session"> --%>
<!-- 						<select name="from" id="from2"> -->
<%-- 							<option value="en" selected><bean:message key="english"/></option> --%>
<%-- 							<option value="es"><bean:message key="spanish"/></option> --%>
<%-- 							<option value="de"><bean:message key="german"/></option> --%>
<%-- 							<option value="fr"><bean:message key="french"/></option> --%>
<!-- 						</select>  -->
<%-- 					</logic:equal> --%>
					
<%-- 					<logic:equal value="es" name="from" scope="session"> --%>
<!-- 						<select name="from" id="from2"> -->
<%-- 							<option value="en"><bean:message key="english"/></option> --%>
<%-- 							<option value="es" selected><bean:message key="spanish"/></option> --%>
<%-- 							<option value="de"><bean:message key="german"/></option> --%>
<%-- 							<option value="fr"><bean:message key="french"/></option> --%>
<!-- 						</select>  -->
<%-- 					</logic:equal> --%>
					
<%-- 					<logic:equal value="de" name="from" scope="session"> --%>
<!-- 						<select name="from" id="from2"> -->
<%-- 							<option value="en"><bean:message key="english"/></option> --%>
<%-- 							<option value="es"><bean:message key="spanish"/></option> --%>
<%-- 							<option value="de" selected><bean:message key="german"/></option> --%>
<%-- 							<option value="fr"><bean:message key="french"/></option> --%>
<!-- 						</select>  -->
<%-- 					</logic:equal> --%>
					
<%-- 					<logic:equal value="fr" name="from" scope="session"> --%>
<!-- 						<select name="from" id="from2"> -->
<%-- 							<option value="en"><bean:message key="english"/></option> --%>
<%-- 							<option value="es"><bean:message key="spanish"/></option> --%>
<%-- 							<option value="de"><bean:message key="german"/></option> --%>
<%-- 							<option value="fr" selected><bean:message key="french"/></option> --%>
<!-- 						</select>  -->
<%-- 					</logic:equal> --%>
					
<!-- 					to -->
					
<%-- 					<logic:equal value="en" name="to" scope="session"> --%>
<!-- 						<span id="to">to</span> -->
<!-- 						<select name="to" id="to2"> -->
<%-- 							<option value="en" selected><bean:message key="english"/></option> --%>
<%-- 							<option value="es"><bean:message key="spanish"/></option> --%>
<%-- 							<option value="de"><bean:message key="german"/></option> --%>
<%-- 							<option value="fr"><bean:message key="french"/></option> --%>
<!-- 						</select>  -->
<%-- 					</logic:equal> --%>
					
<%-- 					<logic:equal value="es" name="to" scope="session"> --%>
<!-- 						<span id="to">to</span> -->
<!-- 						<select name="to" id="to2"> -->
<%-- 							<option value="en"><bean:message key="english"/></option> --%>
<%-- 							<option value="es" selected><bean:message key="spanish"/></option> --%>
<%-- 							<option value="de"><bean:message key="german"/></option> --%>
<%-- 							<option value="fr"><bean:message key="french"/></option> --%>
<!-- 						</select>  -->
<%-- 					</logic:equal> --%>
					
<%-- 					<logic:equal value="de" name="to" scope="session"> --%>
<!-- 						<span id="to">to</span> -->
<!-- 						<select name="to" id="to2"> -->
<%-- 							<option value="en"><bean:message key="english"/></option> --%>
<%-- 							<option value="es"><bean:message key="spanish"/></option> --%>
<%-- 							<option value="de" selected><bean:message key="german"/></option> --%>
<%-- 							<option value="fr"><bean:message key="french"/></option> --%>
<!-- 						</select>  -->
<%-- 					</logic:equal> --%>
					
<%-- 					<logic:equal value="fr" name="to" scope="session"> --%>
<!-- 						<span id="to">to</span> -->
<!-- 						<select name="to" id="to2"> -->
<%-- 							<option value="en"><bean:message key="english"/></option> --%>
<%-- 							<option value="es"><bean:message key="spanish"/></option> --%>
<%-- 							<option value="de"><bean:message key="german"/></option> --%>
<%-- 							<option value="fr" selected><bean:message key="french"/></option> --%>
<!-- 						</select>  -->
<%-- 					</logic:equal> --%>
					
					
				</div>
			</form>
			<div class="separador"></div>
			<a href="#" onclick="toggle_visibility('stable');">
				<div id="chars"></div>
			</a>
		</div>
	</div>
</div>
